package com.gxa.mapper.shezhimapper;

import com.gxa.pojo.ShangPin;
import com.gxa.pojo.ShangPin_SheZhi;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author weishen
 */
@Mapper
public interface ShangPinMapper1 {

    List<ShangPin> selectAllShangPin();
    int selectCountShangPin();
    int selectCountAnyShangPin(@Param("shangPinBianHao") String shangPinBianHao,
                            @Param("shangPinMingCheng") String shangPinMingCheng,
                            @Param("guiGeXingHao") String guiGeXingHao);
    List<ShangPin> selectAllShangPinForPage(@Param("index") int index,@Param("size") int size);
    List<ShangPin> selectShangPinByBianHaoOrMingChengOrGuiGeXingHao(@Param("index") int index, @Param("size") int size,
                                                                    @Param("shangPinBianHao") String shangPinBianHao,
                                                                    @Param("shangPinMingCheng") String shangPinMingCheng,
                                                                    @Param("guiGeXingHao") String guiGeXingHao);

    int insertShangPin(ShangPin_SheZhi shangPin);

    int updateShangPinById(ShangPin_SheZhi shangPin);

    int deleteShangPinById(int id);

}
